Regarding virtual machine technology in the computer field, as shown in FIG. 1, a virtual machine system typically comprises a virtual machine manager (e.g., Hypervisor in Xen) installed on a computer hardware platform and a plurality of operating systems (OSs), one of which being Domain 0, i.e., the Host OS, and the remaining ones being Guest OSs. In a virtual machine environment, hardware devices on the hardware platform can be directly used by Domain 0. For a Guest OS, however, hardware devices used are typically those virtualized for it by the virtual machine manager, which degrades the performance of the Guest OS. In order to enhance the access capability to the hardware devices by a Guest OS, improvements can be made with respect to direct hardware access (DHA) by the Guest OS. However, according to the existing designs for DHA by the Guest OS, only DHA of a certain PCI device is taken into consideration without designing the direct access of software and hardware as a whole. Under such circumstance, there tends to be incompatibility problem for devices in the hardware platform. Further, according to the existing architecture, in designing DHA of a certain hardware PCI device in a hardware platform, consideration is given only to provide a hardware PCI device to a certain Guest OS in a DHA mode. Thus, if it is desired to provide more hardware in the hardware platform to a certain operating system in a DHA mode, separate design for each of the hardware devices is required, and higher requirements are imposed on the operating system of Domain 0. This may cause a lot of trouble in programming and developing.
During implementing the present invention, at least the following problems are found by the inventors.
In terms of hardware, a hardware device can be provided to a particular virtual operating system in a DHA mode. However, there is no corresponding support in terms of software. That is, BIOS remains virtual for the particular virtual operating system, which leads to incompatibility between the hardware device and a plurality of operating systems. On the other hand, it is impossible to provide a plurality of hardware on a hardware platform as a whole only to a particular operating system in a DHA mode.